package net.chathu.airgw.model 
{
	/**
	 * ...
	 * @author ze
	 */
	public class P2PUser implements IUser
	{
		private var _id:String;
		private var _originalName:String;
		private var _name:String;
		private var _lastPingDate:Date = new Date();
		
		public function P2PUser(id:String, requestedNick:String) 
		{
			_id = id;
			_originalName = requestedNick;
		}
		
		public function get id():* {
			return _id;
		}
		
		public function get originalName():String {
			return _originalName;
		}
		
		public function get name():String {
			return _name;
		}
		
		public function set name(n:String):void {
			_name = n;
		}
		
		public function get userHost():String {
			return "gw^" + name +"!~user@p2p.chat.hu";
		}
		
		public function get lastPingDate():Date {
			return _lastPingDate;
		}
		
		public function updateLastPingTime():void {
			_lastPingDate = new Date();
		}
		
	}

}